import Layout from "@/layout";
export const constantRoutes = [
  {
    path: "/login",
    component: () => import("@/views/login/index"),
    hidden: true,
  },

  {
    path: "/404",
    component: () => import("@/views/404"),
    hidden: true,
  },

  {
    path: "/",
    component: Layout,
    redirect: "/home",
    meta: {title: "尚医通后台管理系统"},
    children: [
      {
        path: "home",
        name: "Home",
        component: () => import("@/views/dashboard/index"),
        meta: { title: "首页", icon: "el-icon-s-home" },
      },
    ],
  },
  {
    path: "/hospital",
    component: Layout,
    redirect: "/hospital/hospitalset",
    name: "Hospital",
    meta: { title: "医院管理", icon: "el-icon-s-shop", name: "Hospital123" },
    children: [
      {
        path: "hospitalset",
        name: "Hospitalset",
        component: () => import("@/views/hospital/hospitalset/index"),
        meta: { title: "医院设置", name: "Hospital/Set" },
      },
      {
        path: "hospitallist",
        name: "Hospitallist",
        component: () => import("@/views/hospital/hospitallist/index"),
        meta: { title: "医院列表", name: "Hospital/List" },
      },
      {
        path: "hospitallistshow/:id",
        name: "Hospitallistshow",
        component: () => import("@/views/hospital/hospitallist/show/index"),
        meta: { title: "医院详情", name: "Hospital/Show" },
        hidden: true,
      },
      {
        path: "ModifyHospital",
        name: "ModifyHospital",
        component: () =>
          import("@/views/hospital/hospitalset/ModifyHospital/index"),
        meta: { title: "添加医院" },
        // 隐藏 修改医院页面
        hidden: true,
      },
      {
        path: "ModifyHospital/:id",
        name: "ModifyHospital",
        component: () =>
          import("@/views/hospital/hospitalset/ModifyHospital/index"),
        meta: { title: "修改医院" },
        // 隐藏 修改医院页面
        hidden: true,
      },
      {
        path: "paiban/:id",
        name: "Paiban",
        component: () => import("@/views/hospital/hospitallist/paiban/index"),
        meta: { title: "医院排班" },
        hidden: true,
      },
    ],
  },
];

export const activeRouter = [
  {
    path: "/hospital",
    component: Layout,
    redirect: "/hospital/hospitalset",
    name: "Hospital",
    meta: { title: "医院管理", icon: "el-icon-s-shop", name: "Hospital123" },
    children: [
      {
        path: "hospitalset",
        name: "Hospitalset",
        component: () => import("@/views/hospital/hospitalset/index"),
        meta: { title: "医院设置", name: "Hospital/Set" },
      },
      {
        path: "hospitallist",
        name: "Hospitallist",
        component: () => import("@/views/hospital/hospitallist/index"),
        meta: { title: "医院列表", name: "Hospital/List" },
      },
      {
        path: "hospitallistshow/:id",
        name: "Hospitallistshow",
        component: () => import("@/views/hospital/hospitallist/show/index"),
        meta: { title: "医院详情", name: "Hospital/Show" },
        hidden: true,
      },
      {
        path: "ModifyHospital",
        name: "ModifyHospital",
        component: () =>
          import("@/views/hospital/hospitalset/ModifyHospital/index"),
        meta: { title: "修改医院" },
        // 隐藏 修改医院页面
        hidden: true,
      },
      {
        path: "paiban/:id",
        name: "Paiban",
        component: () => import("@/views/hospital/hospitallist/paiban/index"),
        meta: { title: "医院排班" },
        hidden: true,
      },
    ],
  },
  /* 
     "Cmn/Dict",
      "Member/memberList",
      "Hospital/Schedule",
      "Acl/Permision",
      "Hospital/Set",
      "Hospital/List",
      "Hospital123",
      "Acl/User",
      "dddddd",
      "Cmndsf",
      "Order/orderList",
      "Member",
      "Order",
      "156651",
      "Acl/Role",
      "Member/Show",
      "Order/Show",
      "Acl",
      "Statistics",
      "Statistics/appointmentStatistics",
      "Hospital/Show",
      "RoleAuth",
      "444",
      "Member/certificationApprovalList"
    */
  {
    path: "/cmn",
    component: Layout,
    redirect: "/cmn/dict",
    meta: { title: "数据管理", icon: "el-icon-tickets", name: "Cmn/Dict" },
    children: [
      {
        path: "dict",
        name: "Dict",
        component: () => import("@/views/cmn/dict/index"),
        meta: { title: "数据字典", name: "Cmn/Dict" },
      },
    ],
  },
  {
    path: "/user",
    component: Layout,
    redirect: "/user/userInfo",
    name: "Hospital",
    meta: { title: "会员管理", icon: "el-icon-user", name: "Acl" },
    children: [
      {
        path: "userInfo",
        name: "UserInfo",
        component: () => import("@/views/user/userInfo/index"),
        meta: { title: "会员列表", name: "Acl/User" },
      },
      {
        path: "authList",
        name: "AuthList",
        component: () => import("@/views/user/authList/index"),
        meta: { title: "认证审批列表", name: "Acl/Role" },
      },
      {
        path: "show",
        name: "Show",
        component: () => import("@/views/user/show/index"),
        meta: { name: "Acl/Permision" },
        hidden: true, //隐藏页面
      },
    ],
  },
  {
    path: "/order",
    component: Layout,
    redirect: "/order/list",
    meta: { title: "订单管理", icon: "el-icon-tickets", name: "Order" },
    children: [
      {
        path: "list",
        name: "List",
        component: () => import("@/views/order/list/index"),
        meta: { title: "订单列表", name: "Order/orderList" },
      },
      {
        path: "show/:id",
        name: "Shows",
        component: () => import("@/views/order/show/index.vue"),
        meta: { title: "订单详情" ,name:"Order/Show"},
        hidden: true, //隐藏页面
      },
    ],
  },
  {
    path: "/statistics",
    component: Layout,
    redirect: "/statistics/order",
    meta: { title: "统计管理", icon: "el-icon-s-grid", name: "Statistics" },
    children: [
      {
        path: "order",
        name: "Order",
        component: () => import("@/views/statistics/order/index"),
        meta: { title: "统计列表", name: "Statistics/appointmentStatistics" },
      },
    ],
  },
];

export const anyRouter = [
  // 404 page must be placed at the end !!!
  { path: "*", redirect: "/404", hidden: true },
];

export const no={ path: "*", redirect: "/404", hidden: true }

export const jingtai=[    
  {
  path: '/hospital',
  component: Layout,
  redirect: '/hospital/hospitalset',
  name: 'Hospital',
  meta: { title: '医院管理', icon: 'el-icon-s-shop' ,name:"Hospital123"},
  children: [
    {
      path: 'hospitalset',
      name: 'Hospitalset',
      component: () => import('@/views/hospital/hospitalset/index'),
      meta: { title: '医院设置', name:"Hospital/Set"}
    },
    {
      path: 'hospitallist',
      name: 'Hospitallist',
      component: () => import('@/views/hospital/hospitallist/index'),
      meta: { title: '医院列表' ,name:"Hospital/List"}
    },
    {
      path: 'hospitallistshow/:id',
      name: 'Hospitallistshow',
      component: () => import('@/views/hospital/hospitallist/show/index'),
      meta: { title: '医院详情' ,name:"Hospital/Show"},
      hidden:true
    },
    {
      path: "ModifyHospital/:id?",
      name: "ModifyHospital",
      component: () =>
        import("@/views/hospital/hospitalset/ModifyHospital/index"),
      meta: { title: "修改医院" ,name:"Hospital/Schedule"},
      // 隐藏 修改医院页面
      hidden: true,
    },
    {
      path: 'paiban/:id',
      name: 'Paiban',
      component: () => import('@/views/hospital/hospitallist/paiban/index'),
      meta: { title: '医院排班' ,name:"Member/memberList"},
      hidden:true
    },
  ]
},

{
path: "/cmn",
component: Layout,
redirect: "/cmn/dict",
meta: { title: "数据管理", icon: "el-icon-tickets" ,name:"Cmndsf"},
children: [
  {
    path: "dict",
    name: "Dict",
    component: () => import("@/views/cmn/dict/index"),
    meta: { title: "数据字典",name:"Cmn/Dict" },
  },
],
},
{
path: "/user",
component: Layout,
redirect: "/user/userInfo",
name: "Hospital",
meta: { title: "会员管理", icon: "el-icon-user" ,name:"Acl"},
children: [
  {
    path: "userInfo",
    name: "UserInfo",
    component: () => import("@/views/user/userInfo/index"),
    meta: { title: "会员列表" ,name:"Acl/User"},
  },
  {
    path: "authList",
    name: "AuthList",
    component: () => import("@/views/user/authList/index"),
    meta: { title: "认证审批列表" ,name:"156651"},
  },
  {
    path: "show",
    name: "Show",
    component: () => import("@/views/user/show/index"),
    meta:{name:"Acl/Permision",name:"Member/certificationApprovalList"},
    hidden: true,//隐藏页面
  },
],
},
{
path: "/order",
component: Layout,
redirect: "/order/list",
meta: { title: "订单管理", icon: "el-icon-tickets" ,name:"Order"},
children: [
  {
    path: "list",
    name: "List",
    component: () => import("@/views/order/list/index"),
    meta: { title: "订单列表" ,name:"Order/orderList"},
  },
  // 点击订单列表页面 操作查看按钮 跳转到 订单详情页的 路由跳转
  {
    path: "show/:id",
    name: "Shows",
    component: () => import("@/views/order/show/index.vue"),
    meta: { title: "订单详情" ,name:"Order/Show"},
    hidden: true, //隐藏页面
  },
],
},
{
path: "/statistics",
component: Layout,
redirect: "/statistics/order",
meta: { title: "统计管理", icon: "el-icon-s-grid" ,name:"Statistics"},
children: [
  {
    path: "order",
    name: "Order",
    component: () => import("@/views/statistics/order/index"),
    meta: { title: "统计列表", name:"Statistics/appointmentStatistics"},
  },
],
},]
